<extend name="Public/base"/>

<block name="body">
    <div class="row">
        <div class="col-md-12">
            <div class="tabbable tabbable-custom boxless">
                <form id="form" action="{:U('save')}" method="post" class="form-1" >
                <ul class="nav nav-tabs">
                <volist name="Think.config.CONFIG_GROUP_LIST" id="group">
        
                    <li <eq name="id" value="$key"><assign name="configName" value="$group" /> class="active"</eq>><a href="{:U('?id='.$key)}">{$group}配置</a></li>
        
                </volist>
                </ul>
                
                <div class="tab-content">
                    <div class="portlet box blue">
                        <div class="portlet-title">
                            <div class="caption"><i class="fa fa-reorder"></i>
                                {$configName}配置
                            </div>
                            <div class="tools">
                                <a href="javascript:;" class="collapse"></a>
                                <a href="#portlet-config" data-toggle="modal" class="config"></a>
                                <a href="javascript:;" class="reload"></a>
                                <a href="javascript:;" class="remove"></a>
                            </div>
                        </div>
                        <div class="portlet-body form">
                            <!-- BEGIN FORM-->
                            
                                <div class="form-body">

                                    <volist name="list" id="config">
                                    <div class="form-group">
                                        <label class="item-label">{$config.title}<span class="check-tips">（{$config.remark}）</span> </label>
                                        <div class="controls">
                                        <switch name="config.type">
                                        <case value="0">
                                        <input type="text" class="form-control input-medium" name="config[{$config.name}]" value="{$config.value}">
                                        </case>
                                        <case value="1">
                                        <input type="text" class="form-control input-xlarge" name="config[{$config.name}]" value="{$config.value}">
                                        </case>
                                        <case value="2">
                                        <textarea class="form-control input-xlarge" rows="3"  name="config[{$config.name}]">{$config.value}</textarea>
                                        </case>
                                        <case value="3">
                                        <textarea class="form-control input-xlarge" rows="3"  name="config[{$config.name}]">{$config.value}</textarea>
                                        </case>
                                        <case value="4">
                                        <select class="form-control input-medium" name="config[{$config.name}]">
                                            <volist name=":parse_config_attr($config['extra'])" id="vo">
                                                <option value="{$key}" <eq name="config.value" value="$key">selected</eq>>{$vo}</option>
                                            </volist>
                                        </select>
                                        </case>
                                        </switch>
                                            
                                        </div>
                                    </div>
                                    </volist>
                                </div>
                                
                                
                                <div class="form-actions fluid ">
                                    <div class="col-md-offset-3 col-md-9">
                                        <empty name="list">
                                        <button type="submit" disabled class="btn green submit-btn disabled" target-form="form-1">确 定</button>
                                        <else/>
                                        <button type="submit" class="btn green submit-btn ajax-post" target-form="form-1">确 定</button>
                                        </empty>
                                        <button class="btn default btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>                         
                                    </div>
                                </div>
                            
                            <!-- END FORM--> 
                        </div>
                    </div>
                </div>
                
                </form>
            </div>
        </div>
    </div>
</block>

<block name="script">	
	<!-- BEGIN PAGE LEVEL SCRIPTS -->
	<script src="__STATIC__/scripts/app.js"></script>
	<script>
		jQuery(document).ready(function() {       
			App.init();
		})
	</script>

</block>
